<?php
/**
 * Created by PhpStorm.
 * User: guo
 * Date: 2017/6/18
 * Time: 11:24
 */
namespace core\lib;
class model extends \PDO
{
//    public function __construct($dsn='', $username='', $passwd='')              //给个默认值，否则会报错。
    public function __construct()                                                 //直接调用，不用在里面传参也可以实现。
    {
        $dsn      = 'mysql:host=localhost;dbname=arctic_circle';
        $username = 'root';
        $passwd   = 'root';
        try
        {
            parent::__construct($dsn, $username, $passwd);
        }catch (\PDOException $e)
        {
            p($e->getMessage());
        }
    }
}